package info.niwota.pasta;

import java.util.List;

import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
/**
 * 
 */

/**
 * @author qiangli
 *
 */
public final class Intents {
	//TODO Sphinx VI change
	public static final String EXTRA_INPUT = "instant.mail.extra.input";
	public static final String EXTRA_TITLE = "instant.mail.extra.title";
	
	private Intents() {
		//
	}

	public static boolean isViAvailable(Context ctx) {
		final PackageManager pm = ctx.getPackageManager();
		final Intent i = createViIntent();
		List<ResolveInfo> l = pm.queryIntentActivities(i,
				PackageManager.MATCH_DEFAULT_ONLY);
		return (l.size() > 0);
	}
	
	public static Intent createViIntent() {
		final Intent i = new Intent(Intent.ACTION_GET_CONTENT);
		i.setClassName("info.niwota.vi", "info.niwota.vi.VoiceInputActivity");
		return i;
	}
}
